/******************************************************************************
 *
 * Project:		mGameEngine
 * File:		hdr.h
 * Author:		twoja stara
 * Created on:	2009-09-20
 *
 ******************************************************************************/

#ifndef HDR_H_
#define HDR_H_

#include "postprocess.h"

namespace mGameEngine
{
namespace Graphics
{

/**
 * High dynamic range (HDR) post-process.
 * High dynamic range (HDR) post-process emphesises bright objects on scene
 * by adding bright glow around them.
 * It isn't actually true HDR. It's just neat trick giving similar effect
 * but it's much simplier and more portable.
 */
class HighDynamicRange: public PostProcess
{
protected:
	/**
	 * Post-process strength.
	 */
	float _strength;

public:
	/**
	 * Create HDR post-process with specified strength and input/output.
	 * @param strength HDR post-process strength.
	 * @param texture input image texture
	 * @param target output render target
	 */
	HighDynamicRange(float strength = 1.0f,
					const Texture *texture = NULL,
					RenderTarget *target = NULL);

	/**
	 * Destroy HDR post-process.
	 */
	virtual ~HighDynamicRange();

	/**
	 * Get HDR post-process strength.
	 * @return HDR post-process strength.
	 */
	float getStrength() const
	{
		return _strength;
	}

	/**
	 * Set HDR post-process strength.
	 * @param strength HDR post-process strength.
	 */
	void setStrength(float strength);

	/**
	 * Process input image and render output to render target.
	 */
	virtual void process() const;
};

}
}

#endif // HDR_H_
